<template>
  <el-input
    v-model="tableFormData[index][getTableProp(columnInfo)]"
    :maxlength="_rules.max_length || undefined"
    :show-word-limit="_info.show_word_limit || false"
    :disabled="_info.disabled || false"
    :placeholder="_info.placeholder || '请输入'"
  />
</template>

<script setup>
import { getTableProp } from './const';
const props = defineProps({
  tableFormData: {
    type: Object,
    default: () => {}
  },
  columnInfo: {
    type: Object,
    default: () => {}
  },
  index: {
    type: Number,
    default: undefined
  }
});

const _info = computed(() => props.columnInfo || {});
const _rules = computed(() => props.columnInfo?.rules || {});
</script>

<style lang="scss" scoped></style>
